#include <UnitLen.h>
const UnitLen& BASE = UnitLen("Base",1,NULL);
const UnitLen& INCH = UnitLen("Inch",1,&BASE);  //Inch is the base length unit
const UnitLen& FEET = UnitLen("Feet",2,&INCH);
const UnitLen& YARD = UnitLen("Yard",3,&FEET);
const UnitLen& MILE = UnitLen("Mile",1760,&YARD);
const UnitLen& UnitLen::MAXUNITLEN = MILE;

const UnitType UnitLen::UNIT_TYPE_LEN = UnitType();

UnitLen::UnitLen(const char* const unitName, double ratio, const Unit* p_nextMaxUnit):
         Unit(&UNIT_TYPE_LEN,unitName,ratio,p_nextMaxUnit)
{
}
bool UnitLen::getMaxUnit(const Unit** p_unit) const
{
    if(p_unit != NULL)
    {
        *p_unit = &MAXUNITLEN;
        return true;
    }
    return false;
}
